package com.nl.bean.input;

import java.io.Serializable;

/**
 * @author shihb
 * @date 2019/12/18 18:03
 * 用户行为数据样例类-输入
 */
public class UserBehavior implements Serializable {

  /**
   * 用户Id
   */
  private long userId;
  /**
   * 商品Id
   */
  private long itemId;
  /**
   * 商品所属id
   */
  private int categoryId;
  /**
   * 用户行为('pv','buy','cart','fav')
   */
  private String behavior;
  /**
   * 行为发生的时间戳,单位秒
   */
  private long timestamp;

  public UserBehavior() {
  }

  public UserBehavior(long userId, long itemId, int categoryId, String behavior, long timestamp) {
    this.userId = userId;
    this.itemId = itemId;
    this.categoryId = categoryId;
    this.behavior = behavior;
    this.timestamp = timestamp;
  }

  public static UserBehavior of(long userId, long itemId, int categoryId, String behavior, long timestamp) {
    return new UserBehavior(userId,itemId,categoryId,behavior,timestamp);
  }


  public long getUserId() {
    return userId;
  }

  public void setUserId(long userId) {
    this.userId = userId;
  }

  public long getItemId() {
    return itemId;
  }

  public void setItemId(long itemId) {
    this.itemId = itemId;
  }

  public int getCategoryId() {
    return categoryId;
  }

  public void setCategoryId(int categoryId) {
    this.categoryId = categoryId;
  }

  public String getBehavior() {
    return behavior;
  }

  public void setBehavior(String behavior) {
    this.behavior = behavior;
  }

  public long getTimestamp() {
    return timestamp;
  }

  public void setTimestamp(long timestamp) {
    this.timestamp = timestamp;
  }
}
